/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.nju.zyy.share;

/**
 * 
 * @author yingyzhang
 */
public class EvenGenerator extends IntGenerator {

	private int currentEvenValue = 0;

	// need to be synchronized
	@Override
	public int next() {
		currentEvenValue++;
		// Danger point here!
		currentEvenValue++;
		return currentEvenValue;
	}

	public static void main(String[] args) {
		EvenChecker.test(new EvenGenerator());
	}

}
